package com.example.springboot.pattern.strategy;

public class DomesticDeliveryStrategy implements DeliveryStrategy {
    @Override
    public double calculateCost(double weight) {
        if (weight <= 1) {
            return 5.0;
        }
        if (weight <= 5) {
            return 7.0;
        }
        return 8.0 + (weight - 5) * 0.5;
    }
}
